home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 011 / timer1.arc / TIMER1.DOC < prev    next >
Encoding:
Text File  |  1986-09-13  |  1.0 KB  |  23 lines

  1.  Timer1 is a simple timer program written in C.  The routines are for
  2.  Lattice C but can easily be modified to work with any PC-DOS C compiler.
  3.  
  4.  The routines are handy for when you wish to time the execution of a program.
  5.  The function starttm sets the start time in a global variable, and the
  6.  function stoptm returns the difference between the stop time and start
  7.  time in seconds.  The routines can be easily modified to return hours,
  8.  minutes, or hundredths of seconds.  Notice that the functions do not check
  9.  to see if a new day begins during execution (only a problem if you're up
  10.  after midnight), and the stoptm function returns an integer instead of
  11.  a long integer.
  12.  
  13.  The functions can also be used for executing a wait command.  Simply
  14.  excute starttm(), then have a while loop which checks the value of
  15.  stoptm() until it is greater than or equal to the required wait time.
  16.  
  17.  Feel free to modify these routines as desired.
  18.  
  19.  The program timer1.exe is a simple example of the use of these routines.
  20.  
  21.  
  22.  
  23.